<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>用户列表</title>
</head>
<body>
<!--一个基本的 html表格-->
<table border="1px" cellspacing="0px">
  <tr>
    <th th:width="40px">id</th>
    <th th:width="40px">年龄</th>
    <th th:width="150px">名字</th>
    <th >删除</th>
    <th>更新</th>


  </tr>
  <tr th:each="person:${personlist}">
    <td th:text="${person.id}"></td>
    <td th:text="${person.age}"></td>
    <td th:text="${person.name}"></td>
<!--    通过a标签的href属性值发起deletepersonbyid请求被controller层拦截-->
    <td><a th:href="@{deletepersonbyid(id=${person.id})}">删除用户</a> </td>
    <td><a th:href="@{updatepersonbyid(id=${person.id},name=${person.name},age=${person.age})}">更新用户</a> </td>
  </tr>

</table>
</body>
</html>